abstract class Employee
{
    private String name;
    private int number;
    private double salary;
    Employee(){}

    Employee(String name,int number,double salary)
    {
        this.name=name;
        this.number=number;
        this.salary=salary;
    }

    public String getName()
    {
        return name;
    }
    public int getNumber()
    {
        return number;
    }
    public double getSalary()
    {
        return salary;
    }
    public abstract void work();
}

class Programmer extends Employee
{
Programmer(){
    super();
}
    Programmer(String name,int number,double salary){
        super(name,number,salary);
    }

    public  void work(){

        System.out.println("name:"+getName()+"id:"+getNumber()+"pay:"+getSalary());//谁调getSalary()这个方法返回的就是谁的工资
        System.out.println("Programmer work ......");
    }
}

class Manager extends Employee
{
    private double bonus;
    Manager(){
        super();
    }

    Manager(String name,int number,double salary,double bonus){
        super(name,number,salary);
        this.bonus=bonus;
    }

    public  void work(){
        System.out.println("name:"+getName()+"id:"+getNumber()+"pay:"+getSalary()+"bonus:"+bonus);
        System.out.println("Manager work ......");
    }
}

class Demo7 {


    public static void main(String[] args) {

        Programmer a = new Programmer(" xiaoming", 1, 5000.00);
        a.work();


        Manager manager = new Manager("xiaohong", 8, 8000, 600.0);

        manager.work();

    }
}